import osimport reimport timeimport sys
import OSCfrom threading import Thread

def getOSC(port):
    s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    s.bind(('', port))

    while 1:
        data, address = s.recvfrom(1024)
        print address
        OSC.hexDump(data)
        print OSC.decodeOSC(data)
class testit(Thread):   def __init__ (self,ip):      Thread.__init__(self)      self.ip = ip      self.status = -1   def run(self):      getOSC(8000)
      testit.lifeline = re.compile(r"(\d) received")report = ("No response","Partial Response","Alive")print time.ctime()pinglist = []for host in range(1,70):   ip = "192.168.2."+str(host)   current = testit(ip)   pinglist.append(current)   current.start()for pingle in pinglist:   pingle.join()   print "Status from ",pingle.ip,"is",report[pingle.status]print time.ctime()